﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RegisterationCommon.Notice;
using RegisterationCommon.Common;

namespace RegisterationSystem.Space_Education
{
    public partial class notice_addnew : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        //添加
        protected void Button1_Click(object sender, EventArgs e)
        {
            Notice n = new Notice();
            n.Tile = txtname.Text.Trim();
            n.Status = Convert.ToBoolean(Convert.ToInt32(ddlstatus.SelectedValue));
            //n.Recrive = Convert.ToInt32(ddlRecrive.SelectedValue);
            n.Time = DateTime.Now;
            n.Content = txtContent.Text.Trim();

            string radio = Request.Form["stinfo"];
            if (radio == "1")//被放弃
            {
                n.Recrive = 3;
            }
            else
            {
                n.Recrive = Convert.ToInt32(ddlRecrive.SelectedValue);
            }


            if (n.AddNotice())
            {
                Message.Send(10031);
            }
            else
            {
                Message.Send(10032);
            }
        }
    }
}